﻿using AttributeRouting.Web.Http;
//using log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Water.Model;


namespace Water.RestService.Controllers
{
    public class PipeNetManometryController : ApiController
    {

        private PipeNetManometryQuery Pnmq;
        private PipeNetManometry pnm;

        [POST("GetPipeNetManometrys")]
        public IList<PipeNetManometryQuery> PostGetPipeNetManometrys(PipeNetManometryCon pnmc)
        {
            Pnmq = new PipeNetManometryQuery();
            return Pnmq.GetPipeNetManometrys(pnmc);
        }
        /*
        [POST("GetPipeNetManometrysCount")]
        public int PostGetPipeNetManometrysCount(PipeNetManometry info)
        {
            var where = PipeNetManometryWhere(info);
            int count = rep.LoadCount(where);
            return count;
        }
        */

        [POST("AddPipeNetManometry")]
        public bool PostAddPipeNetManometry(PipeNetManometry info)
        {
            info.MRNO = BuilderMrno.GetMrnoFortbl("Tbt_PipeNetManometry");
            pnm = new PipeNetManometry();
            bool result = pnm.AddPipeNetManometry(info) > 0 ? true : false;
            return result;
        }
        /*
        [POST("EditPipeNetManometry")]
        public bool PostEditPipeNetManometry(PipeNetManometry info)
        {
            bool result = rep.Edit(info);
            return result;
        }

        [GET("DeletePipeNetManometry/{code}")]
        public bool GetDeletePipeNetManometry(string code)
        {
            bool result = rep.Delete(code);
            return result;
        }

        [GET("GetPipeNetManometry/{code}")]
        public PipeNetManometry GetPipeNetManometry(string code)
        {
            var result = rep.Get(code);
            return result;
        }
         * */
    }
}
